<?php

require_once './gg.php';

$sql = "select * from userinfo";

$result = mysqli_query($conn,$sql);

$list = array();
while($data = mysqli_fetch_assoc($result)){
    $list[] = $data;
}

echo json_encode(array(
    'code' => 1,
    'data' => $list
));